//
//  RelationTypeTableViewCell.m
//  AFNetworking
//
//  Created by 陈文斌 on 2019/5/21.
//

#import "FCRelationTypeTableViewCell.h"
#import "CustomerRelationHeader.h"

@interface FCRelationTypeTableViewCell ()
@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation FCRelationTypeTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.backgroundColor = [UIColor clearColor];
        UIView *selectedBackgroundView = [[UIView alloc] initWithFrame:self.frame];
        UIView *selectedTagView = [UIView new];
        [selectedBackgroundView addSubview:selectedTagView];
        [selectedTagView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.mas_equalTo(4);
            make.left.mas_equalTo(0);
            make.top.mas_equalTo(17);
            make.bottom.mas_equalTo(-17);
        }];
        selectedTagView.backgroundColor = FCBlueBackColor;
        
        self.selectedBackgroundView = selectedBackgroundView;
        self.selectedBackgroundView.backgroundColor = FCWhiteColor;
        self.titleLabel = [UILabel new];
        [self.contentView addSubview:self.titleLabel];
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(4);
            make.right.mas_equalTo(-4);
            make.center.mas_equalTo(0);
        }];
        self.titleLabel.font = font13;
        self.titleLabel.textColor = FCTxtColor;
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        self.titleLabel.numberOfLines = 2;
        self.titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
        self.titleLabel.highlightedTextColor = FCBlueBackColor;
        
    }
    return self;
}

- (void)setText:(NSString *)text{
    self.titleLabel.text = text;
}

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
